package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLString;
import HLLib.handfere.HLData;

public class HLClassData extends HLLibClass {
    public HLClassData(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLData();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            HLData.SetKey(args.GetInt(0));
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                HLData.GetKey();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLData.GetKey());
            }
            break;
        }
        case 2: {
            HLData.SetAuth((HLString)args.GetObject(0));
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                HLData.GetAuth();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLData.GetAuth());
            }
            break;
        }
        }
    }
}
